<?php 
$options = get_option( 'complete_theme_settings' ); 
?>
<?php
/******************************************
* Generates Link To Google Font
******************************************/
?>
<?php $fonts = array('Arial','Georgia','Lucida Sans Unicode','Times New Roman','Verdana'); ?>
<?php if($options['body_font'] !== 'Default') { ?>
<?php if (!empty($options['body_font']) && !in_array($options['body_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['body_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['body_font']); ?>
<?php } } ?>
<?php if($options['logo_font'] !== 'Default') { ?>
<?php if (!empty($options['logo_font']) && !in_array($options['logo_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['logo_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['logo_font']); ?>
<?php } } ?>
<?php $fonts = array('Arial','Georgia','Lucida Sans Unicode','Times New Roman','Verdana'); ?>
<?php if($options['nav_font'] !== 'Default') { ?>
<?php if (!empty($options['nav_font']) && !in_array($options['nav_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['nav_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['nav_font']); ?>
<?php } } ?>
<?php if($options['header_font'] !== 'Default') { ?>
<?php if (!empty($options['header_font']) && !in_array($options['header_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['header_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['header_font']); ?>
<?php } } ?>
<?php if($options['page_title_font'] !== 'Default') { ?>
<?php if (!empty($options['page_title_font']) && !in_array($options['page_title_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['page_title_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['page_title_font']); ?>
<?php } } ?>
<?php if($options['breadcrumbs_font'] !== 'Default') { ?>
<?php if (!empty($options['breadcrumbs_font']) && !in_array($options['breadcrumbs_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['breadcrumbs_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['breadcrumbs_font']); ?>
<?php } } ?>
<?php if($options['slider_font'] !== 'Default') { ?>
<?php if (!empty($options['slider_font']) && !in_array($options['slider_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['slider_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['slider_font']); ?>
<?php } } ?>
<?php if($options['content_font'] !== 'Default') { ?>
<?php if (!empty($options['content_font']) && !in_array($options['content_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['content_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['content_font']); ?>
<?php } } ?>
<?php if($options['footer_header_font'] !== 'Default') { ?>
<?php if (!empty($options['footer_header_font']) && !in_array($options['footer_header_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['footer_header_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['nav_font']); ?>
<?php } } ?>
<?php if($options['footer_text_font'] !== 'Default') { ?>
<?php if (!empty($options['footer_text_font']) && !in_array($options['footer_text_font'], $fonts)) { ?>
<link href='http://fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+', $options['footer_text_font']); ?>' rel='stylesheet' type='text/css'>
<?php array_push($fonts, $options['footer_text_font']); ?>
<?php } } ?>
<?php
/******************************************
* Outputs CSS To Header
******************************************/
?>
<style type="text/css">
<?php if($options['body_font'] !== 'Default') { ?>
body {<?php if (!empty($options['body_font'])) { echo 'font-family: ' . $options['body_font']; } ?> !important;}
<?php } ?>
<?php if($options['logo_font'] !== 'Default') { ?>
#logo h2, #logo h1{<?php if (!empty($options['logo_font'])) { echo 'font-family: ' . $options['logo_font']; } ?> !important;}
<?php } ?>
<?php if($options['content_font'] !== 'Default') { ?>
p, ul, ol, em, a, strong, b { <?php if (!empty($options['content_font'])) { echo 'font-family: ' . $options['content_font']; } ?> !important; }
<?php } ?>
<?php if($options['header_font'] !== 'Default') { ?>
#main h1, #main h2, #main h3, #main h4, #main h5, #main h6, #footer h4 { <?php if (!empty($options['header_font'])) { echo 'font-family: ' . $options['header_font']; } ?> !important; }
<?php } ?>
<?php if($options['page_title_font'] !== 'Default') { ?>
#main h1 { <?php if (!empty($options['page_title_font'])) { echo 'font-family: ' . $options['page_title_font']; } ?>!important; }
<?php } ?>
<?php if($options['breadcrumbs_font'] !== 'Default') { ?>
#breadcrumbs { <?php if (!empty($options['breadcrumbs_font'])) { echo 'font-family: ' . $options['breadcrumbs_font']; } ?>!important; }
<?php } ?>
<?php if($options['slider_font'] !== 'Default') { ?>
.nivo-caption { <?php if (!empty($options['slider_font'])) { echo 'font-family: ' . $options['slider_font']; } ?>!important; }
<?php } ?>
<?php if($options['nav_font'] !== 'Default') { ?>
#navigation { <?php if (!empty($options['nav_font'])) { echo 'font-family: ' . $options['nav_font']; } ?>!important; }
<?php } ?>
<?php if($options['footer_header_font'] !== 'Default') { ?>
#footer h4 { <?php if (!empty($options['footer_header_font'])) { echo 'font-family: ' . $options['footer_header_font']; } ?>!important; }
<?php } ?>
<?php if($options['footer_text_font'] !== 'Default') { ?>
#footer p, ul, ol, em, a, strong, b { <?php if (!empty($options['footer_text_font'])) { echo 'font-family: ' . $options['footer_text_font']; } ?>!important; }
<?php } ?>
</style>
<?php ?>